﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{


    /// <summary>
    /// 题目策略
    /// </summary>
    public class question_strategy
    {
        /// <summary>
        /// 策略ID
        /// </summary>
        public string strategy_id { get; set; }
        /// <summary>
        ///  商品ID
        /// </summary>
        public string product_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string product_name { get; set; }
        /// <summary>
        /// 商品图片
        /// </summary>
        public string product_pic { get; set; }
        /// <summary>
        ///  设置答题数量
        /// </summary>
        public int set_question_count { get; set; }
        /// <summary>
        /// 设置正确题数
        /// </summary>
        public int set_pass_count { get; set; }
        /// <summary>
        ///  添加时间
        /// </summary>
        public DateTime addtime { get; set; }
        /// <summary>
        /// 所属用户
        /// </summary>
        public string baseuserid { get; set; }
        /// <summary>
        /// 机器ID 
        /// </summary>
        public string mch_id { get; set; }
        /// <summary>
        /// 策略类型
        /// </summary>
        public question_strategy_type strategy_type { get; set; } 

    }
    /// <summary>
    /// 设置添加修改时候策略参数
    /// </summary>

    public class save_question_strategy
    {

        public string strategy_id { get; set; }
        /// <summary>
        /// 选择商品ID 如果按商品设置的机器则必填
        /// </summary>
        public string product_id { get; set; }
        /// <summary>
        /// 机器ID 如果按机器设置的策略则必填
        /// </summary>
        public string mch_id { get; set; }
        /// <summary>
        /// 设置题目数量
        /// </summary>
        public int? set_question_count { get; set; }
        /// <summary>
        /// 设置正确数量
        /// </summary>
        public int? set_pass_count { get; set; }
        /// <summary>
        /// 策略类型
        /// </summary>
        public question_strategy_type question_strategy_type { get; set; } = question_strategy_type.按商品; 
    }

    public enum question_strategy_type
    {
        按商品 = 0,
        按机器 = 1
    }
    /// <summary>
    /// 返回商品信息列表
    /// </summary>
    public class get_question_product_list : question_strategy
    {
        public int slot_count { get; set; } = 0;
    }

    public class question_strategy_for_search : question_strategy
    {
        public string mch_name { get; set; }
    }
}
